<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * @author sonnk
 * @copyright 2014
 */
 
class Maps extends CI_Controller {
    
	function __construct()
	{
		parent::__construct();			
	    $this->load->model();
		$this->pub->write('title',lang('title_task'));
	}
    function  _remap($method, $params = array())
    {
        if(method_exists($this, $method))
        {
            return call_user_func_array(array($this, $method), $params);
        }
        $this->_view();
    }
	function _view()
	{    
		$data = new stdClass();
        $this->pub->set_tpl('maps');
		$data->lat = $_GET['lat'];
		$data->lng = $_GET['lng'];
		$address = $_GET['address'];
		$district = $_GET['district'];
		$province = $_GET['province'];
		$data->to = $address.', '.$district.', '.$province;
        $content = $this->load->view('view',$data,true);
		$image = base_url()."files/logo/logo.png";
		$description = $this->pub->config['description'];
		$content = $this->load->view('view',$data,true);
		$this->pub->write('title','Tìm đường đi',true);
		$this->pub->write('keywords',"",true);
		$this->pub->write('image',$image,true);
		$this->pub->write('description',$description,true);
        $this->pub->write('content',$content,true);
        $this->pub->render();
	}
}